package com.bootredis.bootredis.elasticsearch.esconf;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


@Configuration
public class EsConf {
    @Bean
    RestHighLevelClient elasticsearchClient() {
        RestHighLevelClient configuration = new RestHighLevelClient(
                RestClient.builder(
                    new HttpHost("192.168.98.128",9200,"http")
                )
        );
        return configuration;
    }
}
